import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import Pages from 'vite-plugin-pages'
import { viteMockServe } from 'vite-plugin-mock'
import * as pkg from "./package.json";

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  },
  base: `./`,
  // base: `/${pkg.name}/`,
  plugins: [vue(), Pages(), viteMockServe({
    mockPath: './src/mock',
    // localEnabled: command === 'dev',
    supportTs: true,
    
  })]
})
